package com.my.swas.sso.module.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.my.swas.common.base.BaseEntity;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName(value = "sys_user")
public class User extends BaseEntity {
    private static final long serialVersionUID = -8736616045315083846L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "user_account")
    private String userAccount;

    @TableField(value = "password")
    private String password;

    /**
     * 是否启用
     */
    private Integer enable;

    /**
     * 验证次数
     */
    private Integer verifyCount;


    private String email;

    private String phone;

    private String avatar;

    private Integer sex;

    @TableField(value = "real_name")
    private String realName;

    @TableField(value = "nick_name")
    private String nickName;

    @TableField(value = "last_login_ip")
    private String lastLoginIp;

    @TableField(value = "last_login_time")
    private String lastLoginTime;

    @TableField(value = "role_ids")
    private String roleIds;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}